﻿using System.Windows;
using System.Windows.Controls;
using Baosight.Platform.Core;
using Baosight.ZNH.ZMCommon;

namespace Baosight.ZNH.ZM.UI
{
    /// <summary>
    /// 首页 安全统计
    /// </summary>
    /// Title:ZM9G
    /// Copyright:Baosight Software LTD.co Copyright (c) 2011
    /// Company:上海宝信软件股份有限公司
    /// Author: 郭淑芳
    /// Version: 1.0
    /// History:
    ///       2012-12-13  郭淑芳   [创建]
    ///  
    ///
    public partial class ZM9G : EFViewCmes
    {
        public ZM9G()
        {
            InitializeComponent();

        }

        public override void Initialize(EIInfo initData)
        {
            this.grid.UpdateData(initData);
            this.riskBarChart.ItemsSource = initData.GetBlock("riskResult").Rows;
            this.ternateBarChart.ItemsSource = initData.GetBlock("ternateResult").Rows;
        }

        /// <summary>
        /// 首页统计--点击更多
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            HyperlinkButton link = sender as HyperlinkButton;
   
            Shell.LoadView("ZM9H");

            link.IsEnabled = true;
        }
    }
}
